var p=1;
var type = "";

$(function() {

	find(1,500,1);
});

function select(obj){
	if(obj!=-1){
	   type = obj;
	}else {
		type = ""
	}
//	alert(obj);
}

function find(page,rows,flag){
	p = page;
	if(flag==2){
		
		p=p+1;
		page=p;
	}
	if(flag==3){
		
		p=p-1;
		if(p<=0)
			p=1;
		page=p;
	}
	$.post("sky.php",{doAction:"act_zhjflog",page:page,rows:rows,start:$('#start').val(),end:$('#end').val(),type:type},function(data){
		 $("#imgList").empty();		
		 $("#imgList").append("<tr><th width='20%'>日期</th><th width='20%'>ID</th><th width='40%'>转换项目</th><th width='20%'>数量</th>");  
		 $.each(data.rs,function(index,item){  
			   
			               $("#imgList").append(  
			                         "<tr> <td>>>> " + item.add_date + "</td>" 
			                       + "<td>" + item.out_id  + "</td>"  
			                       + "<td>" + item.jy_type + "</td>"  
			                       + "<td>" + item.jy_num  + "</td>"  
			                       + "</tr>");  
			             });  

		
	},"json");
}

